home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / quicktime / quicktime vr / vrscript / feature files / vrhash.h < prev    next >
Encoding:
Text File  |  2000-09-28  |  3.5 KB  |  192 lines

  1. //////////
  2. //
  3. //    File:        VRHash.h
  4. //
  5. //    Contains:    Header file for hash table management.
  6. //
  7. //    Written by:    Tim Monroe
  8. //
  9. //    Copyright:    © 1998 by Apple Computer, Inc., all rights reserved.
  10. //
  11. //    Change History (most recent first):
  12. //
  13. //       <1>         11/28/98        rtm        first file (Happy Thanksgiving!)
  14. //       
  15. //////////
  16.  
  17. #pragma once
  18.  
  19. //////////
  20. //
  21. // header files
  22. //       
  23. //////////
  24.  
  25. #include "ComApplication.h"
  26. #include "VRScript.h"
  27.  
  28.  
  29. //////////
  30. //
  31. // constants
  32. //       
  33. //////////
  34.  
  35. // general parameters for our hash table
  36.  
  37. #define kNumEntriesInTable        127            // the number of bucket pointers in the hash table
  38.  
  39. // command codes for each supported command word
  40. // currently there are 121 command codes
  41. enum {
  42.     kInvalidCommand = (UInt32)0,
  43.     kSetVerboseState,
  44.     kOpenQTVRMovieFile,
  45.     kReplaceMainMovie,
  46.     kSetCurrentDirectory,
  47.     kSetBarState,
  48.     kSetButtonState,
  49.     kSetResizeState,
  50.     kSetWindowSize,
  51.     kSetMaxWindowSize,
  52.     kReplaceCursor,
  53.     kSetHotSpotIDCursors,
  54.     kSetHotSpotTypeCursors,
  55.     kGoToNodeID,
  56.     kShowDefaultView,
  57.     kOpenResourceFile,
  58.     kSetCorrection,
  59.     kSetQuality,
  60.     kSetSwingSpeed,
  61.     kSetSwingDirection,    
  62.     kSetSwingState,
  63.     kSetPanAngle,
  64.     kSetTiltAngle,
  65.     kSetPanTiltZoom,
  66.     kSetFieldOfView,
  67.     kSetViewCenter,
  68.     kSetPanLimits,
  69.     kSetTiltLimits,
  70.     kSetZoomLimits,
  71.     kSetHotSpotState,    
  72.     kSetTranslateState,
  73.     kSetClickRadius,
  74.     kSetClickTimeout,
  75.     kSetPanTiltSpeed,
  76.     kSetZoomSpeed,
  77.     kSetMouseScale,
  78.     kSetFrameRate,
  79.     kSetViewRate,
  80.     kSetViewTime,
  81.     kSetViewState,    
  82.     kSetAnimationState,
  83.     kSetControlState,
  84.     kSetFrameAnimState,
  85.     kSetViewAnimState,
  86.     kSetQTVRVisState,
  87.     kSetCachePrefs,
  88.     kSetMovieVolume,
  89.     kSetTrackVolume,
  90.     kSetSoundVolume,
  91.     kSetSoundBalance,    
  92.     kPlaySceneSound,
  93.     kPlaySceneQTMidi,
  94.     kPlayNodeQTMidi,
  95.     kPlayNodeSound,
  96.     kPlayNode3DSound,
  97.     kHotSpotQTMidi,
  98.     kHotSpotSound,
  99.     kHotSpot3DSound,
  100.     kHotSpotMovie,
  101.     kTriggerHotSpot,    
  102.     kPlayQTMidi,
  103.     kPlaySndResource,
  104.     kPlaySoundFile,
  105.     kPlay3DSndResource,
  106.     kPlay3DSndResourceAngle,
  107.     kShowPicture,
  108.     kShowNodePicture,
  109.     kAtTime,
  110.     kAtAppLaunch,
  111.     kAtAppQuit,    
  112.     kAtMouseOverHSID,
  113.     kAtMouseOverHSType,
  114.     kAtClickHSID,
  115.     kAtClickHSType,
  116.     kAtClickCustomButton,
  117.     kAtClickSprite,
  118.     kAtNodeEntry,
  119.     kAtNodeExit,
  120.     kAtPanAngle,
  121.     kAtTiltAngle,    
  122.     kAtZoomAngle,
  123.     kDoBoth,
  124.     kDoNothing,
  125.     kPlayMovie,
  126.     kPlayTransMovie,
  127.     kPlayTransEffect,
  128.     kMoveScreen,
  129.     kBeep,
  130.     kProcessScript,
  131.     kCreateBox,    
  132.     kCreateCone,
  133.     kCreateCylinder,
  134.     kCreateEllipsoid,
  135.     kCreateTorus,
  136.     kCreateRectangle,
  137.     kOpen3DMFFile,
  138.     kSet3DObjLocation,
  139.     kSet3DObjColor,
  140.     kSet3DObjTransp,
  141.     kSet3DObjInterp,    
  142.     kSet3DObjBackface,
  143.     kSet3DObjFill,
  144.     kSet3DObjRotation,
  145.     kSet3DObjRotState,
  146.     kSet3DObjVisState,
  147.     kSet3DObjTexture,
  148.     kDestroy3DObject,
  149.     kSet3DSndLocation,
  150.     kSetVariable,
  151.     kIf,
  152.     kSetSpriteVisState,
  153.     kSetSpriteLayer,
  154.     kSetSpriteGraphicsMode,
  155.     kSetSpriteImageIndex,
  156.     kSetSpriteMatrix,
  157.     kSetSpriteLocation,
  158.     kSetTrackState,
  159.     kSetTrackLayer,
  160.     kSetMovieTime,
  161.     kSetMovieRate,    
  162.     kSetMovieTimeScale
  163. };
  164.  
  165.  
  166. //////////
  167. //
  168. // data types
  169. //       
  170. //////////
  171.  
  172. // a "bucket";
  173. // our hash table is an array of bucket pointers
  174. typedef struct VRScriptHash {
  175.     UInt32                        fCommandCode;        // the command code for the command word
  176.     char                        *fCommandWord;        // the command word
  177.     struct VRScriptHash            *fNextEntry;        // the next entry in the list
  178. } VRScriptHash, *VRScriptHashPtr;
  179.  
  180.  
  181. //////////
  182. //
  183. // function prototypes
  184. //       
  185. //////////
  186.  
  187. void                                VRHash_Init (void);
  188. void                                VRHash_Stop (void);
  189. UInt32                                VRHash_HashCommandWord (char *theCommandWord);
  190. void                                VRHash_PutCommandIntoTable (char *theCommandWord, UInt32 theCommandCode);
  191. UInt32                                VRHash_GetCommandCode (char *theCommandWord);
  192.